﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            Hashtable ht1 = new Hashtable();

            


            ht1.Add(1, "曾婷");
            ht1.Add(2, "胡永嘉");
            ht1.Add(3, "黄嘉钰");
            ht1.Add(11, "林鸿鑫");

            Console.WriteLine("请输入学生的Id：");

            int name = int.Parse(Console.ReadLine());

            bool flag = ht1.ContainsKey(name );

            if (flag)
            {
                Console.WriteLine("您查找的该学生的名字：{0}", ht1[name ].ToString());

            }
            else
            {
                Console.WriteLine("您查找的该学生不存在！");
            }




        }
    }
}
